home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / dev / m68k / keycodes.h < prev    next >
C/C++ Source or Header  |  1995-02-14  |  3KB  |  119 lines

  1. /*    @(#)keycode.h    1.0    10/12/87    (c) 1987 NeXT    */
  2.  
  3. /* 
  4.  * HISTORY
  5.  *  6-Nov-90  John Seamons (jks) at NeXT
  6.  *    For ISO keyboard: sft-keypad-'=' is '|', sft-keypad-'/' is '\',
  7.  *     ctrl-sft-keypad-'=' same as ctrl-'|', ctrl-sft-keypad-'/' same as
  8.  *    ctrl-'\'.  Consistency changes: ctrl-'-' same as ctrl-'_', ctrl-'6'
  9.  *    same as ctrl-'^'.
  10.  *
  11.  *  6-Aug-89  John Seamons (jks) at NeXT
  12.  *    Made shift-esc generate tilda per Leo.
  13.  *
  14.  *  7-Jul-88  John Seamons (jks) at NeXT
  15.  *    Finally exchanged codes for the escape and '~' keys.
  16.  *    Swap your keycaps!
  17.  *
  18.  * 12-Oct-87  John Seamons (jks) at NeXT
  19.  *    Created.
  20.  */
  21.  
  22. #ifndef    _KEYCODES_
  23. #define    _KEYCODES_
  24.  
  25. #define    nul    0x000
  26. #define    soh    0x001
  27. #define    stx    0x002
  28. #define    etx    0x003
  29. #define    eot    0x004
  30. #define    enq    0x005
  31. #define    ack    0x006
  32. #define    bel    0x007
  33. #define    bs    0x008
  34. #define    ht    0x009
  35. #define    nl    0x00a
  36. #define    vt    0x00b
  37. #define    np    0x00c
  38. #define    cr    0x00d
  39. #define    so    0x00e
  40. #define    si    0x00f
  41. #define    dle    0x010
  42. #define    dc1    0x011
  43. #define    dc2    0x012
  44. #define    dc3    0x013
  45. #define    dc4    0x014
  46. #define    nak    0x015
  47. #define    syn    0x016
  48. #define    etb    0x017
  49. #define    can    0x018
  50. #define    em    0x019
  51. #define    sub    0x01a
  52. #define    esc    0x01b
  53. #define    fs    0x01c
  54. #define    gs    0x01d
  55. #define    rs    0x01e
  56. #define    us    0x01f
  57. #define    del    0x07f
  58. #define    inv    0x100        /* invalid key code */
  59. #define    dim    0x101
  60. #define    quiet    0x102
  61. #define    left    0x103
  62. #define    down    0x104
  63. #define    right    0x105
  64. #define    up    0x106
  65. #define    bright    0x107
  66. #define    loud    0x108
  67. #define    mouse_l    0x109
  68.  
  69. u_short ascii[] = {
  70.  
  71.     /* each non-meta code followed by its shifted value */
  72.     inv, inv, dim, dim, quiet, quiet, '\\', '|',
  73.     ']', '}', '[', '{', 'i', 'I', 'o', 'O',
  74.     'p', 'P', left, left, inv, inv, '0', '0',
  75.     '.', '.', '\r', '\r', inv, inv, down, down,
  76.     right, right, '1', '1', '4', '4', '6', '6',
  77.     '3', '3', '+', '+', up, up, '2', '2',
  78.     '5', '5', bright, bright, loud, loud, del, bs,
  79.     '=', '+', '-', '_', '8', '*', '9', '(',
  80.     '0', ')', '7', '7', '8', '8', '9', '9',
  81.     '-', '-', '*', '*', '`', '~', '=', '|',
  82.     '/', '\\', inv, inv, '\r', '\r', '\'', '"',
  83.     ';', ':', 'l', 'L', ',', '<', '.', '>',
  84.     '/', '?', 'z', 'Z', 'x', 'X', 'c', 'C',
  85.     'v', 'V', 'b', 'B', 'm', 'M', 'n', 'N',
  86.     ' ', ' ', 'a', 'A', 's', 'S', 'd', 'D',
  87.     'f', 'F', 'g', 'G', 'k', 'K', 'j', 'J',
  88.     'h', 'H', '\t', '\t', 'q', 'Q', 'w', 'W',
  89.     'e', 'E', 'r', 'R', 'u', 'U', 'y', 'Y',
  90.     't', 'T', esc, '~', '1', '!', '2', '@',
  91.     '3', '#', '4', '$', '7', '&', '6', '^',
  92.     '5', '%',
  93.  
  94.     /* control & control-shift codes */
  95.     inv, inv, dim, dim, quiet, quiet, fs, fs,
  96.     gs, gs, esc, esc, ht, ht, si, si,
  97.     dle, dle, left, left, inv, inv, '0', '0',
  98.     '.', '.', '\r', '\r', inv, inv, down, down,
  99.     right, right, '1', '1', '4', '4', '6', '6',
  100.     '3', '3', '+', '+', up, up, '2', '2',
  101.     '5', '5', bright, bright, loud, loud, inv, inv,
  102.     '=', '+', us, us, '8', '*', '9', '(',
  103.     '0', ')', '7', '7', '8', '8', '9', '9',
  104.     '-', '-', '*', '*', '`', '~', '=', fs,
  105.     '/', fs, inv, inv, '\r', '\r', '\'', '"',
  106.     ';', ':', np, np, ',', '<', '.', '>',
  107.     '/', '?', sub, sub, can, can, etx, etx,
  108.     syn, syn, stx, stx, cr, cr, so, so,
  109.     nul, nul, soh, soh, dc3, dc3, eot, eot,
  110.     ack, ack, bel, bel, vt, vt, nl, nl,
  111.     bs, bs, '\t', '\t', dc1, dc1, etb, etb,
  112.     enq, enq, dc2, dc2, nak, nak, em, em,
  113.     dc4, dc4, esc, '~', '1', '!', nul, nul,
  114.     '3', '#', '4', '$', '7', '&', rs, rs,
  115.     '5', '%',
  116. };
  117.  
  118. #endif    _KEYCODES_
  119.